
<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>css分页效果 </title>
  <!-- CSS代码 -->
  <style>
    @import url('https://fonts.googleapis.com/css?family=Josefin+Sans&display=swap');

    *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    font-family: 'Josefin Sans', sans-serif;
    }

    body{
    background: #fff;
    }

    .wrapper{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 500px;
    height: 60px;
    background: #2c63ff;
    padding: 0px 70px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.125);
    }

    .wrapper ul{
    display: flex;
    text-align: center;
    }

    .wrapper ul li{
    width: 50px;
    font-size: 18px;
    height: 60px;
    line-height: 60px;
    color: #fff;
    cursor: pointer;
    }

    .wrapper ul li:hover,
    .wrapper ul li.active{
    background: #1944bd;
    }

    .wrapper .prev,
    .wrapper .next{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    background: #fff;
    text-align: center;
    line-height: 25px;
    border-radius: 50%;
    cursor: pointer;
    color: #2c63ff;
    }

    .wrapper .prev{
    left: 30px;
    }

    .wrapper .next{
    right: 30px;
    }
</style>

</head>
<body>
<!-- 分页代码 -->
<div class="wrapper">
   <div class="prev"><</div>
   <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li class="active">4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
   </ul>
  <div class="next">></div>
</div>
<!-- 分页代码 -->
  
</body>
</html>
